package com.starhub.api.docarchive.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.starhub.api.docarchive.dto.DocArchiveBaseDTO;
import com.starhub.api.docarchive.entity.DocArchiveBase;
import com.starhub.api.docarchive.result.DocArchiveDealResult;
import com.starhub.api.docarchive.result.DocArchiveListResult;
import com.starhub.api.docarchive.vo.DocArchiveBaseVO;

/**   
 * 系统知识库管理服务层
 * @version: V1.0
 * @author: liuhf
 * @time 2025-05-18
 */
public interface DocArchiveService extends IService<DocArchiveBase> {
    
    DocArchiveListResult getSharedDocArchiveList(Integer pageNum, Integer pageSize);
    
    DocArchiveListResult getPersonalDocArchiveList(Integer pageNum, Integer pageSize);
    
    DocArchiveListResult getFollowedArchiveList(Integer pageNum, Integer pageSize);

    DocArchiveDealResult checkShareDocArchive(Long id, int dealType);

    DocArchiveDealResult getDocArchiveById(long id);
    
    DocArchiveBaseVO getDataById(long id);

    DocArchiveDealResult getDocArchiveByWritingRecordId(long writingRecordId);

    DocArchiveBaseVO getByWritingRecordId(long writingRecordId);

    DocArchiveDealResult createDocArchive(DocArchiveBaseDTO dto);
    
    DocArchiveDealResult updateDocArchive(DocArchiveBaseDTO dto);
    
    DocArchiveDealResult deleteDocArchive(Long id);

    // 新增关注相关方法
    DocArchiveDealResult followArchive(Long archiveId);
    
    DocArchiveDealResult unfollowArchive(Long archiveId);
    
    boolean isFollowed(Long archiveId);

    DocArchiveListResult getSearchDocArchiveList(Integer pageNum, Integer pageSize,String keyWord,Integer type);
    
} 